// 外观模式
package main

import "fmt"

type SystemA struct{}

func (sa *SystemA) MethodA() {
	fmt.Println("子系统A")
}

type SystemB struct{}

func (sb *SystemB) MethodB() {
	fmt.Println("子系统B")
}

type SystemC struct{}

func (sc *SystemC) MethodC() {
	fmt.Println("子系统C")
}

type Facade struct {
	a *SystemA
	b *SystemB
	c *SystemC
}

func (facade *Facade) MethodOne() {
	facade.a.MethodA()
	facade.b.MethodB()
}

func (facade *Facade) MethodTwo() {
	facade.b.MethodB()
	facade.c.MethodC()
}

func main() {
	facade := &Facade{
		a: &SystemA{},
		b: &SystemB{},
		c: &SystemC{},
	}
	facade.MethodOne()
}
